package com.example.springredisdemo.service;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class RedisService {

    @Cacheable(value = "test", key = "'' + #id")
    public String getCacheValue(Integer id) {
        System.out.println("miss the cache:"+id);
        return id+":123456789";
    }

}
